﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;

namespace MvcApplication2.Models
{
    public class ProductDbcontext: DbContext
    {
        public DbSet<Category> Categorys { get; set; }// tương ứng với bảng category
        public DbSet<Product> Products { get; set; }// tương ứng với bảng product

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
        }
    }
}